home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK2.toast / Development Kits (Disc 2) / QuickTime™ IC SDK 1.01 / Interfaces&Libraries / PublicInterfaces / QTIC.h next >
Encoding:
C/C++ Source or Header  |  1997-05-23  |  32.8 KB  |  742 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        QTIC.h
  3.  
  4.      Contains:    QuickTime Image Capture interfaces
  5.  
  6.      Version:    Technology:    
  7.                  Release:    QTIC 1.0 interfaces
  8.  
  9.      Copyright:    © 1996-1997 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@apple.com
  15.  
  16. */
  17.  
  18. #define        MACINTOSH
  19.  
  20. /* ------------------------------------------------------------------------- */
  21.  
  22. #ifndef __QTIC__
  23. #define __QTIC__
  24.  
  25. /* ------------------------------------------------------------------------- */
  26.  
  27. //    Required system include files:
  28.  
  29. /* --- M A C I N T O S H --- */
  30. #ifdef    MACINTOSH
  31.  
  32. #ifndef __TYPES__
  33. #include <Types.h>
  34. #endif
  35.  
  36. #ifndef __EVENTS__
  37. #include <Events.h>
  38. #endif
  39.  
  40. #ifndef __DIALOGS__
  41. #include <Dialogs.h>
  42. #endif
  43.  
  44. #ifndef __QUICKDRAW__
  45. #include <QuickDraw.h>
  46. #endif
  47.  
  48. #ifndef __FILES__
  49. #include <Files.h>
  50. #endif
  51.  
  52. #ifndef __COMPONENTS__
  53. #include <Components.h>
  54. #endif
  55.  
  56. #ifndef __MOVIES__
  57. #include <Movies.h>
  58. #endif
  59.  
  60. #ifndef __QUICKTIMECOMPONENTS__
  61. #include <QuickTimeComponents.h>
  62. #endif
  63.  
  64. #ifndef __QUICKDRAW__
  65. #include <QuickDraw.h>
  66. #endif
  67.  
  68. #ifndef __QDOFFSCREEN__
  69. #include <QDOffscreen.h>
  70. #endif
  71.  
  72. #ifndef __OSUTILS__
  73. #include <OSUtils.h>
  74. #endif
  75.  
  76. #define        FuncPtr(type)        pascal type
  77.  
  78. #endif    /*    MACINTOSH    */
  79. /* ------------------------- */
  80.  
  81. /* ------------------------------------------------------------------------- */
  82.  
  83. //    These are necessary for the Macintosh
  84.  
  85. /* --- M A C I N T O S H --- */
  86. #ifdef    MACINTOSH
  87.  
  88. #ifdef __cplusplus
  89. extern "C" {
  90. #endif
  91.  
  92. #if GENERATINGPOWERPC
  93. #pragma options align=mac68k
  94. #endif
  95.  
  96. #ifdef __CFM68K__
  97. #pragma lib_export on
  98. #endif
  99.  
  100. #endif    /*    MACINTOSH    */
  101. /* ------------------------- */
  102.  
  103. /* ------------------------------------------------------------------------- */
  104. /* ----------------------------------- QTIC -------------------------------- */
  105. /* ------------------------------------------------------------------------- */
  106.  
  107. //    Data types
  108. typedef ComponentInstance QTICControls;
  109. typedef ComponentInstance QTICPanel;
  110. typedef ComponentInstance QTICFilter;
  111. typedef ComponentInstance QTICBackStore;
  112. typedef ComponentInstance QTICDataConversion;
  113. typedef ComponentInstance QTICCamera;
  114.  
  115. typedef    OSType QTICFeatureType, *QTICFeatureTypePtr, **QTICFeatureTypeHandle;
  116. typedef    OSType QTICDataType, *QTICDataTypePtr, **QTICDataTypeHandle;
  117.  
  118. typedef struct QTICFileSpec {
  119.     short        inCamera;        //    MUST be 1
  120.     long        reserved;        //    MUST be -1
  121.     Str63        name;
  122. } QTICFileSpec, *QTICFileSpecPtr, **QTICFileSpecHandle;
  123.  
  124. typedef struct QTICDateTimeRec {
  125.     short                            year;
  126.     short                            month;
  127.     short                            day;
  128.     short                            hour;
  129.     short                            minute;
  130.     short                            second;
  131.     short                            dayOfWeek;    //    0 if unknown.
  132. } QTICDateTimeRec, *QTICDateTimeRecPtr, **QTICDateTimeRecHandle;
  133.  
  134. //    Feature data types
  135. typedef struct QTICListPair {
  136.     Str31            description;    //    String description
  137.     unsigned long    value;            //    Type depends on valueType
  138. } QTICListPair;
  139.  
  140. typedef struct QTICListData {
  141.     unsigned long    count;            //    Number of data pairs
  142.     unsigned long    factory;        //    Factory value
  143.     QTICListPair    data[1];        //    Data type depends on valueType
  144. } QTICListData;
  145.  
  146. typedef struct QTICRangeData {
  147.     //    Data type depends on valueType
  148.     unsigned long    min;            //    Minimum value
  149.     unsigned long    max;            //    Maximum value
  150.     unsigned long    factory;        //    Factory value
  151. } QTICRangeData ;
  152.  
  153. typedef unsigned long QTICParamData;//    QTICParamData will be either:
  154.                                     //    QTICRangeData, QTICListData,
  155.                                     //    Str31, or DOSNAME depending on valueType
  156.  
  157. typedef struct QTICCapabilitiesData {
  158.     QTICFeatureType    type;            //    Feature type identifier
  159.     unsigned long    valueType;        //    Feature data type
  160.     Str31            description;    //    Feature text description
  161.     QTICParamData    paramData[1];    //    Feature capabilities data
  162. } QTICCapabilitiesData, *QTICCapabilitiesDataPtr, **QTICCapabilitiesDataHandle;
  163.  
  164. typedef struct QTICCapabilitiesListData {
  165.     QTICFeatureType    type;            //    Feature type identifier
  166.     unsigned long    valueType;        //    Feature data type
  167.     Str31            description;    //    Feature text description
  168.     QTICListData    listData;        //    Feature capabilities data
  169. } QTICCapabilitiesListData, *QTICCapabilitiesListDataPtr, **QTICCapabilitiesListDataHandle;
  170.  
  171. typedef struct QTICCapabilitiesRangeData {
  172.     QTICFeatureType    type;            //    Feature type identifier
  173.     unsigned long    valueType;        //    Feature data type
  174.     Str31            description;    //    Feature text description
  175.     QTICRangeData    rangeData;        //    Feature capabilities data
  176. } QTICCapabilitiesRangeData, *QTICCapabilitiesRangeDataPtr, **QTICCapabilitiesRangeDataHandle;
  177.  
  178. typedef struct QTICCameraData {
  179.     QTICFeatureType    type;            //    Features type identifier
  180.     unsigned long    valueType;        //    Feature data type
  181.     unsigned long    data[1];        //    Feature data
  182. } QTICCameraData, *QTICCameraDataPtr, **QTICCameraDataHandle;
  183.  
  184. //    Generic Camera data types
  185. typedef struct QTICSpecifications {
  186.     unsigned long    version;        //    version 0x01000000=1.0
  187.     unsigned long    hardwareRev;    //    rev in hex form: 0xabcdefgh = ab.cdefgh version.
  188.     unsigned long    firmwareRev;    
  189.     Str31            vendorName;
  190.     Str31            productName;
  191. } QTICSpecifications, *QTICSpecificationsPtr, **QTICSpecificationsHandle;
  192.  
  193. typedef struct QTICStatus {
  194.     unsigned long    version;            //    version 0x01000000=1.0
  195.     long            imagesLeft;            //    Number of images that can still be taken.
  196.                                         //    -1 if unknown.
  197.     long            imagesTaken;        //    Number of images taken.
  198.                                         //    -1 if unknown.
  199.     long            batteryLevel;        //    1: Empty    255: Full    Negative: Charging
  200.                                         //    0: Unknown battery level not charging
  201.                                         //    -256: Unknown battery level while charging
  202.     long            currentTimer;        //    see 'mtdy' feature.
  203.     unsigned long    currentCompression;    //    see 'cmpn' feature.
  204.     long            currentImageDepth;    //    see 'impm' feature.
  205.     unsigned long    currentStrobe;        //    see 'smod' feature.  nil if N/A.
  206.     unsigned long    currentMacro;        //    see 'mcro' feature.  nil if N/A.
  207.     Boolean            captureReady;        //    true: ready to take picture
  208.     Boolean            strobeCharging;        //    true: charging    
  209.     Boolean            strobeReady;        //    true: ready        false: charging or strobe off
  210.     Boolean            macro;                //    true: macro on
  211.     Boolean            timer;                //    true: timer running
  212.     Boolean            deviceError;        //    true: device error has occured.  Will
  213.                                         //        reset after QTICGetError called.
  214. } QTICStatus, *QTICStatusPtr, **QTICStatusHandle;
  215.  
  216. typedef struct QTICFileInfo {
  217.     unsigned long    version;            //    version 0x01000000=1.0
  218.     unsigned long    fileType;            //    PICT, MooV, JPEG, EXIF, TIFF, etc.
  219.     unsigned long    creatorType;        //    File creator type.  If none selected, use ''.
  220.     long            fileSize;            //    Total file size in bytes. -1 if unknown.
  221.     QTICDateTimeRec    creation;            //    Date and time when taken.
  222.     QTICDateTimeRec    modification;        //    Date and time when last modified.
  223.     unsigned long    imageDepth;            //    see 'impm' feature.
  224.     unsigned long    width;                //    Width in pixels.
  225.     unsigned long    height;                //    Height in pixels.
  226.     UserData        taggedData;
  227. } QTICFileInfo, *QTICFileInfoPtr, **QTICFileInfoHandle;
  228.  
  229. typedef struct QTICError {
  230.     QTICDateTimeRec    dateTime;
  231.     long            errCode;
  232.     Str63            errDescription;    //    C string describing error
  233. } QTICError, *QTICErrorPtr, **QTICErrorHandle;
  234.  
  235. //    Standard header for all settings.
  236. typedef struct QTICSettingsHeader {
  237.     unsigned long        size;            //    Size includes this header.
  238.     unsigned long        type;
  239.     unsigned long        subType;
  240.     unsigned long        manufacturer;
  241.     unsigned long         version;
  242.     QTICDateTimeRec        lastUpdated;
  243. } QTICSettingsHeader;
  244.  
  245. //    Controls Component settings.
  246. typedef struct QTICControlSettings {
  247.     QTICSettingsHeader    header;
  248.  
  249.     unsigned long        cameraType;
  250.     unsigned long        cameraSubType;
  251.     unsigned long        cameraManufacturer;
  252. } QTICControlSettings;
  253.  
  254. //  Panel Component settings for most panels including (Movie, Viewer, and Picture).
  255. typedef struct QTICPanelSettings {                    
  256.     QTICSettingsHeader    header;
  257.  
  258.     Rect                windowLoc;
  259.     FSSpec                file;
  260.  
  261.     long                dataType;
  262.     void                *data;
  263. } QTICPanelSettings;
  264.  
  265. //    ValueType definitions
  266. #define    kQTIC_VT_unsigned_long        1
  267. #define    kQTIC_VT_long                2
  268. #define    kQTIC_VT_Fixed                3
  269. #define    kQTIC_VT_Boolean            4
  270. #define    kQTIC_VT_BitFlags            5
  271. #define    kQTIC_VT_PName                6
  272. #define    kQTIC_VT_DosName            7
  273. #define    kQTIC_VT_Str31                8
  274. #define    kQTIC_VT_ListData            9
  275.  
  276. //    Error codes.
  277. #define        kQTIC_Error                            -6200
  278. #define        kQTIC_noErr                            noErr
  279. #define        kQTIC_commErr                        kQTIC_Error - 0
  280. #define        kQTIC_noCameraErr                    kQTIC_Error - 1
  281. #define        kQTIC_cantOpenPanelErr                kQTIC_Error - 2
  282. #define        kQTIC_printErr                        kQTIC_Error - 3
  283.  
  284. #define        kQTIC_userAbortedErr                userCanceledErr
  285. #define        kQTIC_dskFulErr                        dskFulErr
  286. #define        kQTIC_featureUnsupportedErr            featureUnsupported
  287. #define        kQTIC_paramErr                        paramErr
  288. #define        kQTIC_memFullErr                    memFullErr
  289. #define        kQTIC_fBsyErr                        fBsyErr
  290.  
  291. //    Component types.
  292. #define        kQTICControlsComponentType                'cmrc'
  293. #define        kQTICPanelComponentType                    'cmrp'
  294. #define        kQTICCameraComponentType                'cmra'
  295. #define        kQTICFilterComponentType                'filt'
  296. #define        kQTICBackStoreComponentType                'bkst'
  297. #define        kQTICDataConversionComponentType        'dcnv'
  298.  
  299. //    Component subtypes.
  300. #define        kQTICControlsComponentSubType            'jwdt'
  301. #define        kQTICPComponentManufacturer                'appl'
  302. #define        kQTICPPictPanelComponentSubType            'pict'
  303. #define        kQTICPMoviePanelComponentSubType        'moov'
  304. #define        kQTICPViewerPanelComponentSubType        'view'
  305. #define        kQTICPTextPanelComponentSubType            'text'
  306. #define        kQTICPGenericMainPanelComponentSubType    'main'
  307. #define        kQTICPStampsPanelComponentSubType        'stmp'
  308. #define        kQTICPImageInfoPanelComponentSubType    'iinf'
  309. #define        kQTICPLiveViewPanelComponentSubType        'live'
  310. #define        kQTICPPrintPanelComponentSubType        'prnt'
  311. #define        kQTICPMovieMakerPanelComponentSubType    'mmak'
  312.  
  313. //    Panel Component flags.
  314. #define        kQTICP_MainPanelFlag        0x800000    /*    Used to identify main panels.    */
  315. #define        kQTICP_PrefsPanelFlag        0x400000    /*    Used to identify preferences panels.    */
  316. #define        kQTICP_ShowHidePanelFlag    0x200000    /*    Used to identify panels that will have show and hide.    */
  317. #define        kQTICP_NeedsNewMenuFlag        0x008000    /*    Used to identify panels that can be put into New menu.    */
  318. #define        kQTICP_OpenAtStartupFlag    0x004000    /*    Used to identify panels that are to be opened at startup.    */
  319.  
  320. //    DataType Definitions
  321. #define        kQTICP_FILE_TYPE            'file'        //    File contents are: 'PICT', 'JPEG", 'EXIF', 'TIFF'
  322. #define        kQTICP_BKST_TYPE            'bkst'
  323. #define        kQTICP_THUM_TYPE            'thum'
  324. #define        kQTICP_PICT_TYPE            'PICT'
  325. #define        kQTICP_TIFF_TYPE            'TIFF'
  326. #define        kQTICP_JPEG_TYPE            'JPEG'
  327. #define        kQTICP_EXIF_TYPE            'EXIF'
  328. #define        kQTICP_DIB_TYPE                'DIB '
  329. #define        kQTICP_GWLD_TYPE            'gwld'
  330. #define        kQTICP_Movie_TYPE            'MooV'
  331.  
  332. //    Busy Cursor Flags
  333. #define        kQTIC_BusyCursor_ON            1
  334. #define     kQTIC_BusyCursor_OFF            0
  335.  
  336. /* ------------------------------------------------------------------------- */
  337. /* --------------------- QuickTime™ IC Controls Component ------------------ */
  338. /* ------------------------------------------------------------------------- */
  339.  
  340. /* --- M A C I N T O S H --- */
  341. #ifdef    MACINTOSH
  342.  
  343. //    Component routine selectors.
  344. enum {
  345.     //    Controls Routines
  346.     kQTICCAboutBoxSelect                = 0x01,
  347.     kQTICCInitializeSelect                = 0x02,
  348.     kQTICCGetSettingsSelect                = 0x03,
  349.     kQTICCSetSettingsSelect                = 0x04,
  350.     kQTICCSelectCameraSelect            = 0x05,
  351.     kQTICCGetCameraSelect                = 0x06,
  352.     kQTICCSetCameraSelect                = 0x07,
  353.     kQTICCGetNumPanelsSelect            = 0x08,
  354.     kQTICCGetPanelsSelect                = 0x09,
  355.  
  356.     //    Control Event Handling Routines
  357.     kQTICCIsPanelSelect                    = 0x11,
  358.     kQTICCOpenPanelSelect                = 0x12,
  359.     kQTICCCloseWindowSelect                = 0x13,
  360.     kQTICCEventSelect                    = 0x14,
  361.     kQTICCIdleSelect                    = 0x15,
  362.     kQTICCUpdateCustomMenuSelect        = 0x16,
  363.     kQTICCDoCustomMenuSelect            = 0x17,
  364.     kQTICCGetMenuNameSelect                = 0x18,
  365.     
  366.     //    Control Action Routines
  367.     kQTICCDoActionSelect                = 0x21,
  368.     kQTICCInstallActionFilterSelect        = 0x22,
  369.     kQTICCRemoveActionFilterSelect        = 0x23,
  370.     kQTICCReportErrorSelect                = 0x24,
  371.     kQTICCGetBusyCursorSelect            = 0x25,
  372.     kQTICCSetBusyCursorSelect            = 0x26,
  373.  
  374.     //    Camera Routines.
  375.     kQTICCConnectSelect                    = 0x102,
  376.     kQTICCIsConnectedSelect                = 0x103,
  377.     
  378.     //    Camera Info Routines.
  379.     kQTICCGetSpecificationsSelect        = 0x110,
  380.     kQTICCGetStatusSelect                = 0x111,
  381.     kQTICCGetErrorSelect                = 0x112,
  382.     
  383.     //    Camera Feature Routines.
  384.     kQTICCGetFeatureListSelect            = 0x120,
  385.     kQTICCGetFeatureCapabilitySelect    = 0x121,
  386.     kQTICCGetFeatureSelect                = 0x122,
  387.     kQTICCSetFeatureSelect                = 0x123,
  388.     kQTICCGetFeatureDefaultSelect        = 0x124,
  389.     kQTICCSetFeatureDefaultSelect        = 0x125,
  390.     kQTICCRestoreFeatureDefaultSelect    = 0x126,
  391.  
  392.     //    Camera Data Routines.    
  393.     kQTICCStartCaptureSelect            = 0x130,
  394.     kQTICCStopCaptureSelect                = 0x131,
  395.     kQTICCGetFileListSelect                = 0x132,
  396.     kQTICCGetFileInfoSelect                = 0x133,
  397.     kQTICCEraseFileSelect                = 0x134,
  398.     kQTICCGetDataSelect                    = 0x135,
  399.     kQTICCSetDataSelect                    = 0x136,
  400.     
  401.     //    Camera System Utilities Routines.
  402.     kQTICCGetClockSelect                = 0x140,
  403.     kQTICCSetClockSelect                = 0x141
  404. };
  405.  
  406. //    QTICActionFilterWithRefCon.
  407. typedef FuncPtr(Boolean) (*QTICActionFilterWithRefConProcPtr)(QTICControls controls, short action, void *param1, void *param2, void *param3, void *param4, long refCon);
  408.  
  409. #if GENERATINGCFM
  410. enum {
  411.     uppQTICActionFilterWithRefConProcInfo = kPascalStackBased
  412.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  413.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(QTICControls)))
  414.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  415.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *)))
  416.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void *)))
  417.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(void *)))
  418.          | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(void *)))
  419.          | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(long)))
  420. };
  421. typedef UniversalProcPtr QTICActionFilterWithRefConUPP;
  422.  
  423. #define CallQTICActionFilterWithRefConProc(userRoutine, controls, action, param1, param2, param3, param4, refCon)        \
  424.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppQTICActionFilterWithRefConProcInfo, (controls), (action), (param1), (param2), (param3), (param4), (refCon))
  425. #define NewQTICActionFilterWithRefConProc(userRoutine)        \
  426.         (QTICActionFilterWithRefConUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQTICActionFilterWithRefConProcInfo, GetCurrentISA())
  427. #else
  428. typedef QTICActionFilterWithRefConProcPtr QTICActionFilterWithRefConUPP;
  429.  
  430. #define CallQTICActionFilterWithRefConProc(userRoutine, controls, action, param1, param2, param3, param4, refCon)        \
  431.         (*(userRoutine)) ((controls), (action), (param1), (param2), (param3), (param4), (refCon))
  432. #define NewQTICActionFilterWithRefConProc(userRoutine)        \
  433.         (QTICActionFilterWithRefConUPP)(userRoutine)
  434. #endif
  435.  
  436. //    Flags for File and Edit DoAction.
  437. #define        kQTICFILE_SAVE_FLAG            0x1
  438. #define        kQTICFILE_SAVEAS_FLAG        0x2
  439. #define        kQTICFILE_GETINFO_FLAG        0x4
  440. #define        kQTICFILE_PAGESETUP_FLAG    0x8
  441. #define        kQTICFILE_PRINT_FLAG        0x10
  442. #define        kQTICFILE_ALLFLAGS            0x1f
  443.  
  444. #define        kQTICEDIT_UNDO_FLAG            0x1
  445. #define        kQTICEDIT_CUT_FLAG            0x2
  446. #define        kQTICEDIT_COPY_FLAG            0x4
  447. #define        kQTICEDIT_PASTE_FLAG        0x8
  448. #define        kQTICEDIT_CLEAR_FLAG        0x10
  449. #define        kQTICEDIT_SELECTALL_FLAG    0x20
  450. #define        kQTICEDIT_SELECTNONE_FLAG    0x40
  451. #define        kQTICEDIT_ALLFLAGS            0x7f
  452.  
  453. //    QTICCDoAction selectors.
  454. enum {
  455.     //    File.
  456.     kQTICActionFileGetMenuFlags            = 0x001,    //    WindowRef theWindow, short *flags, (unused), (unused)
  457.     kQTICActionFileSave                    = 0x002,    //    WindowRef theWindow, (unused), (unused), (unused)
  458.     kQTICActionFileSaveAs                = 0x003,    //    WindowRef theWindow, (unused), (unused), (unused)
  459.     kQTICActionFileGetInfo                = 0x004,    //    WindowRef theWindow, (unused), (unused), (unused)
  460.     kQTICActionFilePageSetup            = 0x005,    //    WindowRef theWindow, (unused), (unused), (unused)
  461.     kQTICActionFilePrint                = 0x006,    //    WindowRef theWindow, (unused), (unused), (unused)
  462.     
  463.     //    Edit.
  464.     kQTICActionEditGetMenuFlags            = 0x011,    //    WindowRef theWindow, short *flags, (unused), (unused)
  465.     kQTICActionEditUndo                    = 0x012,    //    WindowRef theWindow, (unused), (unused), (unused)
  466.     kQTICActionEditCut                    = 0x013,    //    WindowRef theWindow, (unused), (unused), (unused)
  467.     kQTICActionEditCopy                    = 0x014,    //    WindowRef theWindow, (unused), (unused), (unused)
  468.     kQTICActionEditPaste                = 0x015,    //    WindowRef theWindow, (unused), (unused), (unused)
  469.     kQTICActionEditClear                = 0x016,    //    WindowRef theWindow, (unused), (unused), (unused)
  470.     kQTICActionEditSelectAll            = 0x017,    //    WindowRef theWindow, (unused), (unused), (unused)
  471.     kQTICActionEditSelectNone            = 0x018,    //    WindowRef theWindow, (unused), (unused), (unused)
  472.  
  473.     //    Panels.
  474.     kQTICActionOpenPanelByComponent        = 0x020,    //    Component theComponent, Handle panelSettings, (unused), (unused)
  475.     kQTICActionClosePanelByComponent    = 0x021,    //    Component theComponent, (unused), (unused), (unused)
  476.     kQTICActionIsPanelOpenByComponent    = 0x022,    //    Component theComponent, (unused), (unused), (unused)
  477.     kQTICActionOpenPanelBySubType        = 0x023,    //    OSType componentSubType, Handle panelSettings, (unused), (unused)
  478.     kQTICActionClosePanelBySubType        = 0x024,    //    OSType componentSubType, (unused), (unused), (unused)
  479.     kQTICActionIsPanelOpenBySubType        = 0x025,    //    OSType componentSubType, (unused), (unused), (unused)
  480.     kQTICActionOpenPanelByFlag            = 0x026,    //    unsigned long componentFlag, Handle panelSettings, (unused), (unused)
  481.     kQTICActionClosePanelByFlag            = 0x027,    //    unsigned long componentFlag, (unused), (unused), (unused)
  482.     kQTICActionIsPanelOpenByFlag        = 0x028,    //    unsigned long componentFlag, (unused), (unused), (unused)
  483.     kQTICActionClosePanelByInstance        = 0x029,    //    ComponentInstance theInstance, (unused), (unused), (unused)
  484.  
  485.     //    Opening panels using file and data.
  486.     kQTICActionOpenFile                    = 0x031,    //    OSType fileType ('' if unknown), QTICFileSpec/FSSpec *theFile, (unused), (unused)
  487.     kQTICActionOpenData                    = 0x032,    //    OSType dataType, void *data, QTICFileSpec/FSSpec *theFile, (unused)
  488.     kQTICActionOpenFileWithDialog        = 0x033,    //    (unused), (unused), (unused), (unused)
  489.     kQTICActionOpenCameraViewer            = 0x034,    //    (unused), (unused), (unused), (unused)
  490.     kQTICActionOpenFolderViewer            = 0x035,    //    (unused), (unused), (unused), (unused)
  491.     kQTICActionOpenImageInfo            = 0x036,    //    QTICFileInfoHandle fileInfo, QTICFileSpec/FSSpec *theFile, (unused), (unused)
  492.     kQTICActionCloseCameraViewer        = 0x037,    //    (unused), (unused), (unused), (unused)
  493.     
  494.     //    Utility.
  495.     kQTICActionSaveImageFile            = 0x040,    //    QTICBackStore bsToSave, FSSpec *theFile, (unused), (unused)
  496.     kQTICActionSaveImageFileWithDialog    = 0x041,    //    QTICBackStore bsToSave, FSSpec *theFile, (unused), (unused)
  497.     kQTICActionSelectFolder                = 0x042,    //    FSSpec *selectedFolder, (unused), (unused), (unused)
  498.     kQTICActionSelectFolderWithNew        = 0x043,    //    FSSpec *selectedFolder, (unused), (unused), (unused)
  499.     kQTICActionOkCancelDialog            = 0x044,    //    unsigned char *prompt, short defaultItem, (unused), (unused)
  500.     
  501.     //    Event notification.
  502.     kQTICActionBeforeMenuSelect            = 0x050,    //    MenuHandle file, MenuHandle edit, (unused), (unused)
  503.     kQTICActionAfterMenuSelect            = 0x051,    //    MenuHandle file, MenuHandle edit, (unused), (unused)
  504.     kQTICActionBeforeMenuKey            = 0x052,    //    MenuHandle file, MenuHandle edit, (unused), (unused)
  505.     kQTICActionAfterMenuKey                = 0x053,    //    MenuHandle file, MenuHandle edit, (unused), (unused)
  506.     kQTICActionSetErrorReporting        = 0x054,    //    Boolean newValue, (unused), (unused), (unused)
  507.     kQTICActionGetErrorReporting        = 0x055,    //    Boolean *origValue, (unused), (unused), (unused)
  508.     kQTICActionSetErrorReportingInDrag    = 0x056,    //    Boolean newValue, (unused), (unused), (unused)
  509.     kQTICActionGetErrorReportingInDrag    = 0x057,        //    Boolean *origValue, (unused), (unused), (unused)
  510.     kQTICActionSetEnablingViewerDrag    = 0x058,    //    Boolean newValue, (unused), (unused), (unused)
  511.     kQTICActionGetEnablingViewerDrag    = 0x059        //    Boolean *origValue, (unused), (unused), (unused)
  512. };
  513.  
  514. //    Prototypes.
  515.  
  516. //    Controls Routines
  517. pascal ComponentResult QTICCAboutBox(QTICControls controls)
  518.               FIVEWORDINLINE(0x2F3C, 0x0, kQTICCAboutBoxSelect, 0x7000, 0xA82A);
  519. pascal ComponentResult QTICCInitialize(QTICControls controls, Handle settings)
  520.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICCInitializeSelect, 0x7000, 0xA82A);
  521. pascal ComponentResult QTICCGetSettings(QTICControls controls, QTICSettingsHeader *header, Handle *settings)
  522.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICCGetSettingsSelect, 0x7000, 0xA82A);
  523. pascal ComponentResult QTICCSetSettings(QTICControls controls, QTICSettingsHeader *header, Handle settings)
  524.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICCSetSettingsSelect, 0x7000, 0xA82A);
  525. pascal ComponentResult QTICCSelectCamera(QTICControls controls)
  526.               FIVEWORDINLINE(0x2F3C, 0x0, kQTICCSelectCameraSelect, 0x7000, 0xA82A);
  527. pascal ComponentResult QTICCGetCamera(QTICControls controls, Component *cameraComponent, QTICCamera *cameraInstance)
  528.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICCGetCameraSelect, 0x7000, 0xA82A);
  529. pascal ComponentResult QTICCSetCamera(QTICControls controls, Component cameraComponent)
  530.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICCSetCameraSelect, 0x7000, 0xA82A);
  531. pascal ComponentResult QTICCGetNumPanels(QTICControls controls, short *numPanels)
  532.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICCGetNumPanelsSelect, 0x7000, 0xA82A);
  533. pascal ComponentResult QTICCGetPanels(QTICControls controls, Component *panels)
  534.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICCGetPanelsSelect, 0x7000, 0xA82A);
  535.           
  536. //    Control Event Handling Routines
  537. pascal ComponentResult QTICCIsPanel(QTICControls controls, WindowRef theWindow, QTICPanel *panel)
  538.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICCIsPanelSelect, 0x7000, 0xA82A);
  539. pascal ComponentResult QTICCOpenPanel(QTICControls controls, Component compon, QTICPanel *panel, Handle settings)
  540.               FIVEWORDINLINE(0x2F3C, 0xc, kQTICCOpenPanelSelect, 0x7000, 0xA82A);
  541. pascal ComponentResult QTICCCloseWindow(QTICControls controls, WindowRef theWindow)
  542.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICCCloseWindowSelect, 0x7000, 0xA82A);
  543. pascal ComponentResult QTICCEvent(QTICControls controls, EventRecord *theEvent)
  544.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICCEventSelect, 0x7000, 0xA82A);
  545. pascal ComponentResult QTICCIdle(QTICControls controls)
  546.               FIVEWORDINLINE(0x2F3C, 0x0, kQTICCIdleSelect, 0x7000, 0xA82A);
  547. pascal ComponentResult QTICCUpdateCustomMenu(QTICControls controls, WindowRef theWindow, MenuHandle mHandle)
  548.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICCUpdateCustomMenuSelect, 0x7000, 0xA82A);
  549. pascal ComponentResult QTICCDoCustomMenu(QTICControls controls, WindowRef theWindow, MenuHandle mHandle, short selectedItem)
  550.               FIVEWORDINLINE(0x2F3C, 0xa, kQTICCDoCustomMenuSelect, 0x7000, 0xA82A);
  551. pascal ComponentResult QTICCGetMenuName(QTICControls controls, WindowRef theWindow, unsigned char *name)
  552.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICCGetMenuNameSelect, 0x7000, 0xA82A);
  553.  
  554. //    Control Action Routines
  555. pascal ComponentResult QTICCDoAction(QTICControls controls, short action, void *param1, void *param2, void *param3, void *param4)
  556.               FIVEWORDINLINE(0x2F3C, 0x12, kQTICCDoActionSelect, 0x7000, 0xA82A);
  557. pascal ComponentResult QTICCInstallActionFilter(QTICControls controls, QTICActionFilterWithRefConUPP filter, long refCon)
  558.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICCInstallActionFilterSelect, 0x7000, 0xA82A);
  559. pascal ComponentResult QTICCRemoveActionFilter(QTICControls controls, QTICActionFilterWithRefConUPP filter, long refCon)
  560.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICCRemoveActionFilterSelect, 0x7000, 0xA82A);
  561. pascal ComponentResult QTICCReportError(QTICControls controls, unsigned char *errStr, ComponentResult cerr)
  562.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICCReportErrorSelect, 0x7000, 0xA82A);
  563. pascal ComponentResult QTICCGetBusyCursor(QTICControls controls, short *getState)
  564.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICCGetBusyCursorSelect, 0x7000, 0xA82A);
  565. pascal ComponentResult QTICCSetBusyCursor(QTICControls controls, short setState)
  566.               FIVEWORDINLINE(0x2F3C, 0x2, kQTICCSetBusyCursorSelect, 0x7000, 0xA82A);
  567.  
  568. //    Camera Routines
  569. pascal ComponentResult QTICCConnect(QTICControls controls, Boolean connected)
  570.               FIVEWORDINLINE(0x2F3C, 0x2, kQTICCConnectSelect, 0x7000, 0xA82A);
  571. pascal ComponentResult QTICCIsConnected(QTICControls controls, Boolean *isConnected)
  572.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICCIsConnectedSelect, 0x7000, 0xA82A);
  573.  
  574. //    Camera Info Routines
  575. pascal ComponentResult QTICCGetSpecifications(QTICControls controls, QTICSpecificationsHandle specifications)
  576.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICCGetSpecificationsSelect, 0x7000, 0xA82A);
  577. pascal ComponentResult QTICCGetStatus(QTICControls controls, QTICStatusHandle status)
  578.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICCGetStatusSelect, 0x7000, 0xA82A);
  579. pascal ComponentResult QTICCGetError(QTICControls controls, QTICErrorHandle error)
  580.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICCGetErrorSelect, 0x7000, 0xA82A);
  581.               
  582. //    Camera Feature Routines
  583. pascal ComponentResult QTICCGetFeatureList(QTICControls controls, long *numberFeatures, QTICFeatureTypeHandle *typeList)
  584.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICCGetFeatureListSelect, 0x7000, 0xA82A);
  585. pascal ComponentResult QTICCGetFeatureCapability(QTICControls controls, QTICFeatureType type, QTICCapabilitiesDataHandle *capability)
  586.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICCGetFeatureCapabilitySelect, 0x7000, 0xA82A);
  587. pascal ComponentResult QTICCGetFeature(QTICControls controls, QTICFeatureType type, QTICCameraDataHandle *data)
  588.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICCGetFeatureSelect, 0x7000, 0xA82A);
  589. pascal ComponentResult QTICCSetFeature(QTICControls controls, QTICCameraDataHandle data)
  590.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICCSetFeatureSelect, 0x7000, 0xA82A);
  591. pascal ComponentResult QTICCGetFeatureDefault(QTICControls controls, QTICFeatureType type, Boolean defaultType, QTICCameraDataHandle *data)
  592.               FIVEWORDINLINE(0x2F3C, 0xa, kQTICCGetFeatureDefaultSelect, 0x7000, 0xA82A);
  593. pascal ComponentResult QTICCSetFeatureDefault(QTICControls controls, QTICCameraDataHandle data)
  594.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICCSetFeatureDefaultSelect, 0x7000, 0xA82A);
  595. pascal ComponentResult QTICCRestoreFeatureDefault(QTICControls controls, QTICFeatureType type, Boolean defaultType)
  596.               FIVEWORDINLINE(0x2F3C, 0x6, kQTICCRestoreFeatureDefaultSelect, 0x7000, 0xA82A);
  597.               
  598. //    Camera Data Routines
  599. pascal ComponentResult QTICCStartCapture(QTICControls controls, QTICDataType type, Handle params)
  600.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICCStartCaptureSelect, 0x7000, 0xA82A);
  601. pascal ComponentResult QTICCStopCapture(QTICControls controls, QTICDataType type, Handle params)
  602.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICCStopCaptureSelect, 0x7000, 0xA82A);
  603. pascal ComponentResult QTICCGetFileList(QTICControls controls, QTICFileSpec *start, long *numberFiles, QTICFileSpecHandle *fileList)
  604.               FIVEWORDINLINE(0x2F3C, 0xc, kQTICCGetFileListSelect, 0x7000, 0xA82A);
  605. pascal ComponentResult QTICCGetFileInfo(QTICControls controls, QTICFileSpec *file, QTICFileInfoHandle fileInfo)
  606.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICCGetFileInfoSelect, 0x7000, 0xA82A);
  607. pascal ComponentResult QTICCEraseFile(QTICControls controls, QTICFileSpec *file)
  608.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICCEraseFileSelect, 0x7000, 0xA82A);
  609. pascal ComponentResult QTICCGetData(QTICControls controls, QTICDataType type, QTICFileSpec *file, Handle params, Handle *data)
  610.               FIVEWORDINLINE(0x2F3C, 0x10, kQTICCGetDataSelect, 0x7000, 0xA82A);
  611. pascal ComponentResult QTICCSetData(QTICControls controls, QTICDataType type, QTICFileSpec *file, Handle params, Handle data)
  612.               FIVEWORDINLINE(0x2F3C, 0x10, kQTICCSetDataSelect, 0x7000, 0xA82A);
  613.  
  614. //    Camera System Utilities Routines
  615. pascal ComponentResult QTICCGetClock(QTICControls controls, QTICDateTimeRec *dateTime)
  616.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICCGetClockSelect, 0x7000, 0xA82A);
  617. pascal ComponentResult QTICCSetClock(QTICControls controls, QTICDateTimeRec *dateTime)
  618.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICCSetClockSelect, 0x7000, 0xA82A);
  619.               
  620. #endif    /*    MACINTOSH    */
  621. /* ------------------------- */
  622.  
  623. /* ------------------------------------------------------------------------- */
  624. /* -------------------- QuickTime IC™ Panel Component ---------------------- */
  625. /* ------------------------------------------------------------------------- */
  626.  
  627. /* --- M A C I N T O S H --- */
  628. #ifdef    MACINTOSH
  629.  
  630. //    Component type.
  631.  
  632. //    Component routine selectors.
  633. enum {
  634.     //    Panel Routines.
  635.     kQTICPAboutBoxSelect                = 0x01,
  636.     kQTICPInitializeSelect                = 0x02,
  637.     kQTICPSetControlsSelect                = 0x03,
  638.     kQTICPGetSettingsSelect                = 0x04,
  639.     kQTICPSetSettingsSelect                = 0x05,
  640.     kQTICPCanUseCameraSelect            = 0x06,
  641.     
  642.     //    Panel Event Handling Routines.
  643.     kQTICPIsPanelSelect                    = 0x11,
  644.     kQTICPCloseWindowSelect                = 0x12,
  645.     kQTICPEventSelect                    = 0x13,
  646.     kQTICPIdleSelect                    = 0x14,
  647.     kQTICPInContentDoubleSelect            = 0x15,
  648.     kQTICPInContentSelect                = 0x16,
  649.     kQTICPGetGrowSizeSelect                = 0x17,
  650.     kQTICPGrowWindowSelect                = 0x18,
  651.     kQTICPZoomWindowSelect                = 0x19,
  652.     kQTICPDoKeyDownSelect                = 0x1a,
  653.     kQTICPDrawSelect                    = 0x1b,
  654.     kQTICPUpdateCustomMenuSelect        = 0x1c,
  655.     kQTICPDoCustomMenuSelect            = 0x1d,
  656.     kQTICPGetMenuNameSelect                = 0x1e,
  657.     kQTICPFinishCustomMenuSelect        = 0x1f,
  658.     kQTICPActivateSelect                = 0x20,
  659.     kQTICPDeactivateSelect                = 0x21
  660. };
  661.  
  662. //    Prototypes.
  663.  
  664. //    Panel Routines.
  665. pascal ComponentResult QTICPAboutBox(QTICPanel qtcp)
  666.               FIVEWORDINLINE(0x2F3C, 0x0, kQTICPAboutBoxSelect, 0x7000, 0xA82A);
  667. pascal ComponentResult QTICPInitialize(QTICPanel qtcp, Handle settings)
  668.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICPInitializeSelect, 0x7000, 0xA82A);
  669. pascal ComponentResult QTICPSetControls(QTICPanel qtcp, QTICControls controls)
  670.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICPSetControlsSelect, 0x7000, 0xA82A);
  671. pascal ComponentResult QTICPGetSettings(QTICPanel qtcp, Handle *settings)
  672.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICPGetSettingsSelect, 0x7000, 0xA82A);
  673. pascal ComponentResult QTICPSetSettings(QTICPanel qtcp, Handle settings)
  674.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICPSetSettingsSelect, 0x7000, 0xA82A);
  675. pascal ComponentResult QTICPCanUseCamera(QTICPanel qtcp, QTICControls controls)
  676.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICPCanUseCameraSelect, 0x7000, 0xA82A);
  677.               
  678. //    Panel Event Handling Routines.
  679. pascal ComponentResult QTICPIsPanel(QTICPanel qtcp, WindowRef theWindow)
  680.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICPIsPanelSelect, 0x7000, 0xA82A);
  681. pascal ComponentResult QTICPCloseWindow(QTICPanel qtcp, WindowRef theWindow)
  682.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICPCloseWindowSelect, 0x7000, 0xA82A);
  683. pascal ComponentResult QTICPEvent(QTICPanel qtcp, EventRecord *theEvent)
  684.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICPEventSelect, 0x7000, 0xA82A);
  685. pascal ComponentResult QTICPIdle(QTICPanel qtcp)
  686.               FIVEWORDINLINE(0x2F3C, 0x0, kQTICPIdleSelect, 0x7000, 0xA82A);
  687. pascal ComponentResult QTICPInContentDouble(QTICPanel qtcp, WindowRef theWindow, EventRecord *theEvent)
  688.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICPInContentDoubleSelect, 0x7000, 0xA82A);
  689. pascal ComponentResult QTICPInContent(QTICPanel qtcp, WindowRef theWindow, EventRecord *theEvent)
  690.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICPInContentSelect, 0x7000, 0xA82A);
  691. pascal ComponentResult QTICPGetGrowSize(QTICPanel qtcp, WindowRef theWindow, Rect *size)
  692.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICPGetGrowSizeSelect, 0x7000, 0xA82A);
  693. pascal ComponentResult QTICPGrowWindow(QTICPanel qtcp, WindowRef theWindow, Rect *old, Rect *new)
  694.               FIVEWORDINLINE(0x2F3C, 0xc, kQTICPGrowWindowSelect, 0x7000, 0xA82A);
  695. pascal ComponentResult QTICPZoomWindow(QTICPanel qtcp, WindowRef theWindow, short windowPart)
  696.               FIVEWORDINLINE(0x2F3C, 0x6, kQTICPZoomWindowSelect, 0x7000, 0xA82A);
  697. pascal ComponentResult QTICPDoKeyDown(QTICPanel qtcp, WindowRef theWindow, EventRecord *theEvent)
  698.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICPDoKeyDownSelect, 0x7000, 0xA82A);
  699. pascal ComponentResult QTICPDraw(QTICPanel qtcp, WindowRef theWindow)
  700.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICPDrawSelect, 0x7000, 0xA82A);
  701. pascal ComponentResult QTICPUpdateCustomMenu(QTICPanel qtcp, WindowRef theWindow, MenuHandle mHandle)
  702.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICPUpdateCustomMenuSelect, 0x7000, 0xA82A);
  703. pascal ComponentResult QTICPDoCustomMenu(QTICPanel qtcp, WindowRef theWindow, MenuHandle mHandle, short selectedItem)
  704.               FIVEWORDINLINE(0x2F3C, 0xa, kQTICPDoCustomMenuSelect, 0x7000, 0xA82A);
  705. pascal ComponentResult QTICPGetMenuName(QTICPanel qtcp, WindowRef theWindow, unsigned char *name)
  706.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICPGetMenuNameSelect, 0x7000, 0xA82A);
  707. pascal ComponentResult QTICPFinishCustomMenu(QTICPanel qtcp, WindowRef theWindow, MenuHandle mHandle)
  708.               FIVEWORDINLINE(0x2F3C, 0x8, kQTICPFinishCustomMenuSelect, 0x7000, 0xA82A);
  709. pascal ComponentResult QTICPActivate(QTICPanel qtcp, WindowRef theWindow)
  710.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICPActivateSelect, 0x7000, 0xA82A);
  711. pascal ComponentResult QTICPDeactivate(QTICPanel qtcp, WindowRef theWindow)
  712.               FIVEWORDINLINE(0x2F3C, 0x4, kQTICPDeactivateSelect, 0x7000, 0xA82A);
  713.  
  714. #endif    /*    MACINTOSH    */
  715. /* ------------------------- */
  716.  
  717. /* ------------------------------------------------------------------------- */
  718.  
  719. //    These are necessary for the Macintosh
  720.  
  721. /* --- M A C I N T O S H --- */
  722. #ifdef    MACINTOSH
  723.  
  724. #ifdef __CFM68K__
  725. #pragma lib_export off
  726. #endif
  727.  
  728. #if GENERATINGPOWERPC
  729. #pragma options align=reset
  730. #endif
  731.  
  732. #ifdef __cplusplus
  733. }
  734. #endif
  735.  
  736. #endif    /*    MACINTOSH    */
  737. /* ------------------------- */
  738.  
  739. /* ------------------------------------------------------------------------- */
  740.  
  741. #endif /* __QTIC__ */
  742.